/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package layoutHandling;

/**
 * Layout class that stores the xml data received from the web service; created for backup purposes
 * @author Tudor
 */
public class Layout {

    private boolean aeh;
    private boolean expert;
    private boolean a_help;
    private boolean aeh_approved;
    private boolean gender_separation;
    private boolean presence;
    private boolean culture;
    private boolean hierarchy;
    private boolean l_help;
    private boolean access;
    private boolean choice;
    private boolean ambiguity;
    private boolean security;

    public Layout() {
    }

    public Layout(boolean aeh, boolean expert, boolean a_help, boolean aeh_approved, boolean gender_separation, boolean presence, boolean culture, boolean hierarchy, boolean l_help, boolean access, boolean choice, boolean ambiguity, boolean security) {
        this.aeh = aeh;
        this.expert = expert;
        this.a_help = a_help;
        this.aeh_approved = aeh_approved;
        this.gender_separation = gender_separation;
        this.presence = presence;
        this.culture = culture;
        this.hierarchy = hierarchy;
        this.l_help = l_help;
        this.access = access;
        this.choice = choice;
        this.ambiguity = ambiguity;
        this.security = security;
    }
    /*
     * Matchs this layout with another layout
     * One layout should be a predefined layout, from the web service, and 
     * the other should be the layout to be matched
     * 
     * @return returns the matching percentage of the two layouts 
     */
    public float match(Layout other) {

        float score=0;
        if (aeh==other.aeh)
            score+=7.6923;
        if (expert==other.expert)
            score+=7.6923;
        if (a_help==other.a_help)
            score+=7.6923;
        if (aeh_approved==other.aeh_approved)
            score+=7.6923;
        if (gender_separation==other.gender_separation)
            score+=7.6923;
        if (presence==other.presence)
            score+=7.6923;
        if (culture==other.culture)
            score+=7.6923;
        if (hierarchy==other.hierarchy)
            score+=7.6923;
        if (l_help==other.l_help)
            score+=7.6923;
        if (access==other.access)
            score+=7.6923;
        if (choice==other.choice)
            score+=7.6923;
        if (ambiguity==other.ambiguity)
            score+=7.6923;
        if (security==other.security)
            score+=7.6923;
        
        return score;
    }

    // getters and setters
    
    
    public boolean isA_help() {
        return a_help;
    }

    public void setA_help(boolean a_help) {
        this.a_help = a_help;
    }

    public boolean isAccess() {
        return access;
    }

    public void setAccess(boolean access) {
        this.access = access;
    }

    public boolean isAeh() {
        return aeh;
    }

    public void setAeh(boolean aeh) {
        this.aeh = aeh;
    }

    public boolean isAeh_approved() {
        return aeh_approved;
    }

    public void setAeh_approved(boolean aeh_approved) {
        this.aeh_approved = aeh_approved;
    }

    public boolean isAmbiguity() {
        return ambiguity;
    }

    public void setAmbiguity(boolean ambiguity) {
        this.ambiguity = ambiguity;
    }

    public boolean isChoice() {
        return choice;
    }

    public void setChoice(boolean choice) {
        this.choice = choice;
    }

    public boolean isCulture() {
        return culture;
    }

    public void setCulture(boolean culture) {
        this.culture = culture;
    }

    public boolean isExpert() {
        return expert;
    }

    public void setExpert(boolean expert) {
        this.expert = expert;
    }

    public boolean isGender_separation() {
        return gender_separation;
    }

    public void setGender_separation(boolean gender_separation) {
        this.gender_separation = gender_separation;
    }

    public boolean isHierarchy() {
        return hierarchy;
    }

    public void setHierarchy(boolean hierarchy) {
        this.hierarchy = hierarchy;
    }

    public boolean isL_help() {
        return l_help;
    }

    public void setL_help(boolean l_help) {
        this.l_help = l_help;
    }

    public boolean isPresence() {
        return presence;
    }

    public void setPresence(boolean presence) {
        this.presence = presence;
    }

    public boolean isSecurity() {
        return security;
    }

    public void setSecurity(boolean security) {
        this.security = security;
    }
    
}
